-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Implement redirection without tee and rotation on windows #49906
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
4000f16
to
db56818
Compare
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
Offline discussion with @jjyao , this PR will focus on windows stream redirection, and I will followup with other two PRs to
|
Signed-off-by: dentiny <[email protected]>
3d4e757
to
80220aa
Compare
|
||
std::ostringstream buffer; | ||
buffer << file.rdbuf(); | ||
RAY_CHECK(file.good()) << "Fails to read from file " << fname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading, the file should be in the eof state which is not good()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so.
I did a simply experiment.
Setup:
[~]
ubuntu@hjiang-devbox-pg$ echo "helloworld" > hello.out
[~]
ubuntu@hjiang-devbox-pg$ g++ -std=c++17 fstream_test.cc -o test
[~]
ubuntu@hjiang-devbox-pg$ ./test
0
helloworld
Code
#include <fstream>
#include <sstream>
#include <cassert>
#include <iostream>
int main() {
std::fstream fs("/home/ubuntu/hello.out");
std::ostringstream buffer;
buffer << fs.rdbuf();
std::cout << fs.rdstate() << std::endl;
std::cout << std::move(buffer).str() << std::endl;
assert(fs.good());
return 0;
}
Signed-off-by: dentiny <[email protected]>
4a19181
to
960b54e
Compare
Triggered windows tests |
This PR follows #49821 (which only implement linux part), this PR follows up for part of the windows implementation.